import time

from selenium.webdriver.common.by import By
from selenium import webdriver

web = webdriver.Edge()
web.implicitly_wait(10)

web.get("https://www.byhy.net/cdn2/files/selenium/test2.html")

# 获取当前选中的元素
element = web.find_element(By.CSS_SELECTOR,
  '#s_radio input[name="teacher"]:checked')
print('当前选中的是: ' + element.get_attribute('value'))

# 点选 小雷老师
web.find_element(By.CSS_SELECTOR, '#s_radio input[value="小雷老师"]').click()
time.sleep(5)